﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CJJCH.Web.Manage
{
    public partial class OnlineDetails : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitRequest();
                InitDataBind();
            }
        }
        private void InitRequest()
        {
            if (Request.QueryString["ID"] != null)
            {
                lblID.Text = Request.QueryString["ID"].ToString();
            }
        }
        private void InitDataBind()
        {
            if (lblID.Text != "" && LTP.Common.CheckInput.CheckGUID(lblID.Text))
            {
                CJJCH.Model.T_NET_Online model = new Model.T_NET_Online();
                model = new BLL.T_NET_Online().GetOnlineModel(new Guid(lblID.Text));
                if (model != null)
                {
                    lblCompandName.Text = model.CompanyName;
                    lblCompandAddress.Text = model.CompanyAddress;
                    lblPostCode.Text = model.PostCode;
                    lblContactName.Text = model.ContactName;
                    lblDutyName.Text = model.DutyName;
                    lblDutyName.Text = model.DutyName;
                    if (model.OfficeTel != "")
                    {
                        lblTel.Text = model.OfficeTel;
                    }
                    else
                    {
                        lblTel.Text = model.UserMobile;
                    }
                    lblUserFax.Text = model.UserFax;
                    lblEMail.Text = model.UserEmail;
                    lblItem.Text = model.Olitem.ItemName;
                    lblPeopleCount.Text = model.PeopleCount.ToString();
                    lblBuildDate.Text = model.BuildDate.ToString();


                }
                else
                {
                    LTP.Common.WindowClass.WindowBack("操作错误！");
                }
            }
        }
    }
}